/**
 * Created by Noir on 2/6/14.
 */

var chartCtrl = require('../../controllers/charts/chartCtrl');

module.exports = function(app){
    /**
     * create new chart
     */
    app.post('/api/charts', chartCtrl.createNewChart);
    /**
     * add candidate to this chart
     */
    app.post('/api/charts/addDetail/:chartId', chartCtrl.addDetailToChart);
    /**
     * find one chart detail
     */
    app.get('/api/chartDetail/:id', chartCtrl.findOneChartDetail);
    /**
     * add new chart detail
     */
    app.post('/api/chartDetail', chartCtrl.createNewChartDetail);
}